/**
 * @function namespace/signatrue - Component type : Control type : Parser.formskin : Parser.impl : html
 * conf - configuration properties for layout
 * prop - properties
 * parentconf - parent element conf
 * parentprop - parent element prop
 */
Parser["control:customhtml:default:Json2htmlParser:html"] = function(confs) {
	var s = "";
	for (var c in confs) {
		var conf = confs[c];
		var prop = conf.id ? Parser.props[conf.id] : {};
		var data = {};
		data.style = Parser.cssDisplay(prop.display)+(prop.style?prop.style:"")+(prop.margintop?"margin-top:"+prop.margintop:"");
		Parser.log(JSON.stringify(conf));
		Parser.log(JSON.stringify(prop));
		Parser.parseDataProvider(conf.id);
		s += '<div id="'+conf.id+'" '+
				' class="cellborderCHtml '+(prop["className"] ? prop["className"] : '')+'" '+
				(data.style ? ' style="'+data.style+'"' : '')
	//	    	(prop["style"] ? ' style="'+prop["style"]+'"' : '')
		    	+ '>'+
		    	(prop['htmlcode'] || '')+
		     '</div>';
	}
	return s;
};

Parser["control:customhtml:bootstrap-blue:Json2htmlParser:html"] = function(confs) {
	var s = "";
	for (var c in confs) {
		var conf = confs[c];
		var prop = conf.id ? Parser.props[conf.id] : {};
		Parser.log(JSON.stringify(conf));
		Parser.log(JSON.stringify(prop));
		var data = {};
		var transform = {"tag":"i"};
		var fmdcols = parseInt(conf.fmdcols);
		transform.html = '<div'+(fmdcols?' class="col-md-'+fmdcols+'"':'')+'>'+
						    '<div '+(prop["className"] ? ' class="'+prop["className"]+'"' : '')+
						    	(prop["style"] ? ' style="'+prop["style"]+'"' : '') + '>'+
						    	(prop['htmlcode'] || '')+
				            '</div>'+
					     '</div>';
		var wrapper = json2html.transform(data, transform);
		s += wrapper.substr(0, wrapper.length-4).substr(3);
	}
	return s;
};


